<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../layui/jquery-3.2.1.min.js"></script>
    <script src="../layui/layui.js"></script>
    <script src="js/outOfStock.js"></script>
    <link href="../layui/css/layui.css" rel="stylesheet">
    <link href="css/outOfStock.css" rel="stylesheet">
</head>
<body>
    <div class="layui-container">
        <hr>
        <h1>销售出库</h1>
        <hr>
        <div id="oneDiv" class="layui-row" >
            <form id="orderForm">
                <div class="layui-col-md3">
                    客户   <select id="clientSelect" name="customerName"></select>
                </div>
                <div class="layui-col-md3">
                    销售员  <span id="sallerSpan"></span>
                </div>

                <div class="layui-col-md3">
                    订单总额 <span id="amountSpan"></span><br>
                </div>

                <div class="layui-input-block" style="display: flex;flex-direction: row">
                    <input type="text" id="address" name="address" style="margin-left:-100px; margin-top: 20px;width: 150px;height: 30px" class="layui-input" placeholder="送货地址"><div id="addressError"></div>
                </div>
            </form>
        </div>
        <hr>
        <div>
            出库物品
            <table class="layui-table">
                <thead>
                <tr><th>商品名称</th><th>厂家</th><th>现有库存</th><th>建议销售价</th><th>出库数量</th><th>操作</th></tr>
                </thead>
                <tbody id="commodityData"></tbody>
            </table>
        </div>
        <div class="layui-row">
            <div class="layui-col-md4">
                <a class="layui-btn layui-btn-warm" href="javascript:addCommodity()">添加商品</a>
            </div>
            <div class="layui-col-md4">
                <a class="layui-btn layui-btn-warm" href="javascript:outOfStock()">出库</a>
            </div>
        </div>
    </div>

    <!--添加弹出层-->
    <div id="addDiv" class="layui-row" style="display: none" >
        <hr><h3>添加出库商品</h3><hr>
        <div class="layui-col-lg12">
            <table class="layui-table">
                <thead>
                    <tr><th>商品名称</th><th>厂家</th><th>建议销售价</th><th>操作</th></tr>
                </thead>
                <tbody id="allCommodityData"></tbody>
            </table>
            <div id="cutPageDiv"></div>
        </div>
        <div>
            <fieldset>
                <legend>查询采购信息</legend>
                <form id="findByItemForm">
                    <div>
                        商品名称 <input type="text" name="name">
                    </div>
                    <div>
                        类别 <select name="type">
                                <option>不限</option>
                                <option>电脑产品</option>
                                <option>安防产品</option>
                                <option>打印扫描设备</option>
                                <option>办公耗材</option>
                            </select>
                    </div>
                </form>
                <a class="layui-btn layui-btn-warm" href="javascript:findByItem(1)">查询</a>
            </fieldset>
        </div>
    </div>

    <!--出库弹出层-->
    <div id="outOfStockDiv" class="layui-row" style="display: none;text-align: center" >
        <span>出库成功</span><hr>
        <a class="layui-btn layui-btn-warm" href="javascript:layer.closeAll()">确定</a>
    </div>
</body>
</html>